package concurrent.completableFuture;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.TimeUnit;


/**
 * @author shanzhenbo
 */
public class UserService {

	public UserInfo getUserInfo(Integer id) {
		try {
			TimeUnit.SECONDS.sleep(3);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(Thread.currentThread().getName() + "-查询用户成功");
		return new UserInfo("张三", 12, 1);
	}
}

